Function.RegisterNamespace("System.Web.Storage");

System.Web.Storage.StorageManager=function(){
    // Private members
    var _strategyManager;

    // Public Members
    this.Strategies;
        
    // ctor
    function StorageManager(){
        this.Strategies=_strategyManager=new System.Script.Strategy.StrategyManager(
            System.Web.StorageStrategy.Standard,
            System.Web.StorageStrategy.Redmond,
            System.Web.StorageStrategy.Legacy
        );
    }
    StorageManager.apply(this,arguments);

    // IDisposable Methods
    this.Dispose=function(){
        _strategyManager.Clear();
        this.Strategies=_strategyManager=null;
    };
    
    // IStorageStrategy Methods
    this.Clear=function(name){
        _strategyManager.Get(Object.Global()).Clear(name);
    };

    this.Get=function(name){
        return _strategyManager.Get(Object.Global()).Get(name);
    };

    this.Set=function(name,value){
        _strategyManager.Get(Object.Global()).Set(name,value);
    };
};

System.Web.Storage.StorageManager.Implement(System.Web.Event.IStorageStrategy,"System.Web.Storage.StorageManager");